<#import "/common/taglibs/spring.ftl" as spring/>
<#macro sidebarMenu menus top=true group="">
    <#if top!=true>
        <div class="m-menu__submenu ">
            <span class="m-menu__arrow"></span>
            <ul class="m-menu__subnav">
    </#if>
    <#list menus as menu>
            <#if menu.children?? && (menu.children?size gt 0)>
                <#--<li class="nav-item" data-menu-group="${group}">
                    <a href="javascript:;" target="_blank" class="m-menu__link" id="menu_${(menu.code)!}" >
                        <i class="${(menu.icon)!}"></i> 
                        <span class="title"><@showName item=menu/></span>
                        <span class="arrow"></span>
                    </a>
                <@sidebarMenu menus=menu.children top=false group=group/>
                </li>-->
                <li class="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover" data-menu-group="${group}">
                    <a href="javascript:;" target="_blank" class="m-menu__link m-menu__toggle" id="menu_${(menu.code)!}" >
                        <i class="m-menu__link-icon ${(menu.icon)!}">
                            <span></span>
                        </i>
                        <span class="m-menu__link-text"><@showName item=menu/></span>
                        <i class="m-menu__ver-arrow la la-angle-right"></i>
                    </a>
                    <@sidebarMenu menus=menu.children top=false group=group/>
                </li>
            <#else>
                <li class="m-menu__item" aria-haspopup="true" data-menu-group="${group}">
                    <a href="<@menuUrl url=(menu.url)!/>" class="m-menu__link" id="menu_${(menu.code)!}" data-menu-code="${(menu.code)!}" data-pjax>
                        <i class="m-menu__link-icon ${(menu.icon)!}">
                            <span></span>
                        </i>
                        <span class="m-menu__link-text"><@showName item=menu/></span>
                    </a>
                </li>
            </#if>
    </#list>
    <#if top!=true>
            </ul>
        </div>
    </#if>
</#macro>

<#--
<li class="m-menu__item  m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
    <a href="javascript:;" class="m-menu__link m-menu__toggle">
        <i class="m-menu__link-icon flaticon-interface-9"></i>
        <span class="m-menu__link-text">Pricing Tables</span>
        <i class="m-menu__ver-arrow la la-angle-right"></i>
    </a>
    <div class="m-menu__submenu ">
        <span class="m-menu__arrow"></span>
        <ul class="m-menu__subnav">
            <li class="m-menu__item  m-menu__item--parent" aria-haspopup="true">
                <span class="m-menu__link">
                    <span class="m-menu__link-text">Pricing Tables</span>
                </span>
            </li>
            <li class="m-menu__item " aria-haspopup="true">
                <a href="../snippets/general/pricing-tables/pricing-table-1.html" class="m-menu__link ">
                    <i class="m-menu__link-bullet m-menu__link-bullet--dot">
                        <span></span>
                    </i>
                    <span class="m-menu__link-text">Pricing Tables v1</span>
                </a>
            </li>
            <li class="m-menu__item " aria-haspopup="true">
                <a href="../snippets/general/pricing-tables/pricing-table-2.html" class="m-menu__link ">
                    <i class="m-menu__link-bullet m-menu__link-bullet--dot">
                        <span></span>
                    </i>
                    <span class="m-menu__link-text">Pricing Tables v2</span>
                </a>
            </li>
            <li class="m-menu__item " aria-haspopup="true">
                <a href="../snippets/general/pricing-tables/pricing-table-3.html" class="m-menu__link ">
                    <i class="m-menu__link-bullet m-menu__link-bullet--dot">
                        <span></span>
                    </i>
                    <span class="m-menu__link-text">Pricing Tables v3</span>
                </a>
            </li>
            <li class="m-menu__item " aria-haspopup="true">
                <a href="../snippets/general/pricing-tables/pricing-table-4.html" class="m-menu__link ">
                    <i class="m-menu__link-bullet m-menu__link-bullet--dot">
                        <span></span>
                    </i>
                    <span class="m-menu__link-text">Pricing Tables v4</span>
                </a>
            </li>
        </ul>
    </div>
</li>-->
